<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('manage/mainbodyList')}">主体列表</a></li>
			<!-- <li><a href="{:url('fbfans/add')}">添加粉丝页管理列表</a></li> -->
		</ul>
        <form class="well form-inline margin-top-20" method="post" action="{:url('manage/mainbodyList')}">
            查询:
            <input type="text" class="form-control" name="name" style="width: 180px;" value="{:input('request.name/s','')}" placeholder="">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('manage/mainbodyList')}">清空</a>
        </form>

		<form class="well form-inline margin-top-20" method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('manage/mainbodyExcelAdd')}">
			<div class="form-group">  
				 <input id="excel-9" type="hidden" name="excel_url" >
				 <input  id="excel-9-name" type="text" name="excel_name" placeholder="导入表格名称" class="form-control"  style="widtd: 120px;">
				 <a style="padding: 7px 8px;" href="javascript:uploadOne('Excel上传','#excel-9','file');" class="btn btn-sm btn-primary btn-danger">选择上传文件</a>
			</div>
			<div class="form-group">
			  <div class="col-sm-offset-2 col-sm-10">
				 <button type="submit" class="btn btn-primary js-ajax-submit">导入</button>
			  </div>
			</div>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>id</th>
					<th>中文名</th>
					<th>英文名</th>
					<th>是否拉黑</th>
					<th>是否下户</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="mainbodys" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.cn_name}</td>
					<td>{$vo.en_name }</td>
					<td style="color:<?php echo ($vo['status']== 1)? 'green' : 'red'?>"><?php echo ($vo['status']== 1)? '正常' : '拉黑'?></td>
					<td>
						<if condition="$vo.isdown_status eq '1'">没下户
						<elseif condition="$vo.isdown_status eq 2"/>已下户
						<else /> 
						</if>
					</td>
					<td>
						<a href='{:url("manage/editmainbody",array("id"=>$vo.id))}'>{:lang('EDIT')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
